package com.cskaoyan.mapper;

import com.cskaoyan.bean.Order;
import com.cskaoyan.bean.OrderExample;

import java.util.List;
import java.util.Map;

import com.cskaoyan.bean.StatOrder;
import com.cskaoyan.bean.wx.vo.UserOrderStatusVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author
 * @date 2020/12/5 15:59
 */
@Mapper
public interface OrderMapper {
    long countByExample(OrderExample example);

    int deleteByExample(OrderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    List<Order> selectByExample(OrderExample example);

    Order selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByExample(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    List<StatOrder> statOrdersGroupByAddtime();

    Map<String, Object> selectOrderMapByOrderId(Integer orderId);

    List<UserOrderStatusVo> selectUserIndexByUserId(@Param("userId") Integer userId);

    Integer selectComments(@Param("userId") Integer userId);

    List<Map<String, Object>> selectListMapByUserId(@Param("userId") Integer userId);

    List<Map<String, Object>> selectListMapByType4(@Param("userId") Integer userId);

    List<Map<String, Object>> selectListMapByOrderStatus(@Param("userId") Integer userId, @Param("orderStatus") Integer orderStatus);
}